-- Start of DDL Script for Table BRIDGE.EXPORT_FORMAT
-- Generated 18.09.2013 12:21:21 from BRIDGE@lcnp

CREATE TABLE bridge.export_format
    (id                             NUMBER NOT NULL,
    tag                            VARCHAR2(30) NOT NULL,
    format_name                    VARCHAR2(4000)
  ,
  CONSTRAINT XPKEXPORT_FORMAT
  PRIMARY KEY (id)
  USING INDEX
  TABLESPACE  users)
  TABLESPACE  users
/





-- Constraints for BRIDGE.EXPORT_FORMAT

ALTER TABLE bridge.export_format
ADD CONSTRAINT export_format_uk UNIQUE (tag)
USING INDEX
  TABLESPACE  users
/


-- Triggers for BRIDGE.EXPORT_FORMAT

CREATE TRIGGER "BRIDGE".export_format_BI_TRG
 BEFORE 
 INSERT
 ON bridge.export_format
 REFERENCING OLD AS OLD NEW AS NEW
 FOR EACH ROW
BEGIN
   IF :NEW.ID IS NULL OR :NEW.ID = 0
   THEN
      SELECT bridge.SQ_export_format.NEXTVAL
        INTO :NEW.ID
        FROM DUAL;
   END IF;
END;
/


-- End of DDL Script for Table BRIDGE.EXPORT_FORMAT

